<template>
	<view class="">
		<view class="income-box">
			<view class="income-item">
				<view class="income-num">{{income}}</view>
				<view>收益（元）</view>
			</view>
			<view class="income-item">
				<view class="income-num">{{totalIncome}}</view>
				<view>总收益（元）</view>
			</view>
		</view>
		<view class="main-box">
			<view class="func-box">
				<view class="func-item">总数</view>
				<view class="func-item">在线</view>
				<view class="func-item">离线</view>
				<view class="func-item">异常</view>
			</view>
			<view class="list-box">
				<view class="list-title">日收益列表</view>
				<view class="list-item-box">
					<view class="list-item table-tr">
						<view class="">日期</view>
						<view class="">收益</view>
					</view>
					<view class="list-item" v-for="(item,index) in tableData" :key='idnex'>
						<view class="">{{item.date}}</view>
						<view class="">{{item.data}}</view>
					</view>

				</view>

			</view>
		</view>
	</view>
</template>

<script>
	import api from "@/api/api.js";
	export default {
		data() {
			return {
				tableData: [{
					date: '2024.10.11',
					data: '211'
				}, {
					date: '2024.09.11',
					data: '86'
				}, {
					date: '2024.08.11',
					data: '55'
				}],
				income:100,
				totalIncome:500
			};
		},
		methods: {}
	}
</script>
<style lang="scss" scoped>
	.income-box {
		background: linear-gradient(122.66deg, #F69661 0%, #EBBDA4 100%);
		padding: 25px;
		padding-top: 30px;
		padding-bottom: 70px;
		display: flex;
		align-items: center;
		justify-content: space-around;
		gap: 0 25px;

		.income-item {
			display: flex;
			align-items: center;
			justify-content: center;
			flex-direction: column;

			.income-num {
				font-size: 20px;
				font-weight: bold;
				margin-bottom: 10px;
			}
		}

	}


	.main-box {
		padding: 18px 25px;
		margin-top: -30px;
		background-color: #F5F6F7;
		border-radius: 8px 8px 0 0;

		.func-box {
			display: flex;
			align-items: center;
			justify-content: space-between;
			gap: 15px;

			.func-item {
				width: 25%;
				height: 40px;
				text-align: center;
				line-height: 40px;
				background-color: #fff;
				box-shadow: 0px 0px 10px 0px rgba(0, 0, 0, 0.1);
			}
		}
	}

	.list-box {
		.list-title {
			font-size: 14px;
			margin: 15px 0;
		}

		.list-item-box {
			background-color: #fff;
			border: 1px solid #F5F6F7;
			padding: 16px;
			border-radius: 4px;
		}

		.table-tr {
			background-color: #EBBDA4;
		}

		.list-item {
			display: flex;
			align-items: center;
			padding: 8px 0;
			gap: 0 15px;
			padding-left: 10px;

			view {
				flex: 1;
			}
		}

	}
</style>